namespace System
{
  /// <summary>
  /// Observer pattern.
  /// </summary>
  /// <remarks>From FW 4.0</remarks>
  public interface IObserver<T>
  {
    /// <summary>
    /// Called on next item.
    /// </summary>
    /// <param name="item"></param>
    void OnNext(T item);

    /// <summary>
    /// Called when observation completed.
    /// </summary>
    void OnCompleted();

    /// <summary>
    /// Callen on error.
    /// </summary>
    void OnError(Exception exception);
  }
}